const {
	validate,
	validations
} = require('ws-chat-common').validate
const {
	userSocketCollection,
} = require('ws-chat-common').constants


const ws = uniCloud.webSocketServer()
module.exports = async function connection(event) {
	const {
		connectionId
	} = event
	await userSocketCollection.where({
		connectionId,
	}).update({
		onLine: 0
	})


}